//
//  SegmentPageScrollView.h
//  TKnowBox
//
//  Created by LiuXubin on 16/6/29.
//  Copyright © 2016年 knowin. All rights reserved.
//

#import <UIKit/UIKit.h>


@class SimBottomLineSegmentView;

typedef UIView *(^PageContentViewBlock)(NSInteger index);
typedef void (^SelectPageViewBlock)(NSInteger index);

@class SimPageScrollView;
@interface SimSegmentPageScrollView : UIScrollView

- (instancetype)initWithFrame:(CGRect)frame items:(NSArray *)items;

@property (nonatomic, weak) UIView *headerView;

@property (nonatomic, copy) PageContentViewBlock conentViewAtIndexBlock;
@property (nonatomic, copy) SelectPageViewBlock showViewAtIndexBlock;

@property (nonatomic, readonly) SimPageScrollView *pageScrollView;
@property (nonatomic, readonly) SimBottomLineSegmentView *segmentView;
@property (nonatomic, readonly) NSArray *items;

- (void)insertItem:(NSString *)item atIndex:(NSInteger)index;
- (void)removeItemAtIndex:(NSInteger)index;

- (void)removeTargetForContentView:(UIView *)contentView;

@end

#pragma mark - Protocal

@protocol SegmentPageScrollViewProtocal <NSObject>

- (UIScrollView *)innerScollView;

@end
